import common from './common'
import paths from './paths'

const normService = {};

(function (service) {
  // 录入指标下达
  service.saveNormAssign = function (data) {
    return common.post(paths.norm.saveNormAssign, {}, data)
  }
  // 录入指标追加
  service.saveNormAdd = function (data) {
    return common.post(paths.norm.saveNormAdd, {}, data)
  }
  // 指标调剂
  service.adjustNorm = function (data) {
    return common.post(paths.norm.adjustNorm, {}, data)
  }
  // 保存指标转结数据
  service.saveIndexCarryOver = function (indexCarryOverDTO) {
    return common.post(paths.norm.saveIndexCarryOver, {}, indexCarryOverDTO)
  }
  // 删除指标结转数据
  service.deleteIndexCarryOver = function (ids) {
    return common.post(paths.norm.deleteIndexCarryOver, {}, { ids })
  }
  // 计算指标面积
  service.calculateArea = function (data) {
    return common.post(paths.norm.calculateArea, data, null)
  }
  service.saveNormOver = function (data) {
    return common.post(paths.norm.saveNormOver, {}, data)
  }
})(normService)

export default normService
